package com.liuwei.msmall.order.feign;

import com.liuwei.msmall.common.utils.R;
import com.liuwei.msmall.order.vo.LockStockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Classname WareFeignService
 * @Description TODO
 * @Date 2020/7/8 19:58
 * @Created by 刘
 */
@FeignClient("msmall-ware-service")
public interface WareFeignService {

    //查询对应的skuid是否有库存
    @PostMapping("/ware/waresku/hasStock")
    R getHasStock(@RequestBody List<Long> skuids);

    //锁定库存
    @PostMapping("/ware/waresku/lock/order")
    R lockOrderStock(@RequestBody LockStockVo vo);
}